﻿cmake_minimum_required(VERSION 3.0)

# subdirectory project, include quality_inspection_tool
project(quality_inspection_tools)

# global cmake settings
set(CMAKE_CXX_STANDARD 11)

# global include path
include_directories(
    ${PROJECT_SOURCE_DIR}/common/include
    ${PROJECT_SOURCE_DIR}/common/third_party
)
link_directories(
    ${PROJECT_SOURCE_DIR}/common/lib
)

# global output path
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR})
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR})

MESSAGE("**** generating project " ${PROJECT_NAME} "...")
MESSAGE("project global settings:")
MESSAGE("INCLUDE DIRECTORIES " ${INCLUDE_DIRECTORIES})
MESSAGE("EXECUTABLE_OUTPUT_PATH " ${EXECUTABLE_OUTPUT_PATH})
MESSAGE("LIBRARY_OUTPUT_PATH " ${LIBRARY_OUTPUT_PATH})

# 复制文件到buid目录中
FILE(GLOB COMMON_BIN ${CMAKE_SOURCE_DIR}/common/bin/*)
FILE(COPY ${COMMON_BIN} DESTINATION ${CMAKE_BINARY_DIR})

# subdirectory
MESSAGE("build sub projects ...")
add_subdirectory(quality_inspection_tool)

MESSAGE("**** generate done")
